<!--
 * @Author: your name
 * @Date: 2021-12-10 10:46:16
 * @LastEditTime: 2021-12-10 11:26:21
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \Vue\12.10vue\demo.html
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;padding: 0;
        }
        .mask{
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.5);
            position: fixed;
            top: 0;
            left: 0;
        }
        .cont{
            width: 200px;
            height: 200px;background: white;
            position: absolute;
            top: 0;
            left: 0;
            bottom: 0;
            right: 0;
            margin: auto;
        }
    </style>
</head>
<body>
    <div id="app">
        <button v-on:click="flag=true">点我打开弹窗</button>
        <div v-if="flag" class="mask">
            <div class="cont">
                <span @click="flag=false">×</span>
            </div>
        </div>
        <input type="text" v-bind:value="num" @input="changeNum">
        <div v-if="num<78">不及格</div>
        <div v-else-if="num>78&&num<90">一般般</div>
        <div v-else>挺好</div>
    </div>
    <script src="./vue.js"></script>
    <script>
        const vue=new Vue({
            el:'#app',
            data(){
                return {
                    flag:false,
                    num:98
                }
            },
            methods: {
                changeNum(e) {
                    console.log('打印',this,e.target.value);
                    this.num=e.target.value
                },
            },
        })
    </script>
</body>
</html>